//1.导入定义仓库的方法
 import { defineStore } from "pinia";
 import { ref,computed } from "vue";
 //2.定义一个仓库
  export const listStore = defineStore('list',() =>{
    //准备一个空数组
    const list = ref<string[]>([])
    //准备一个计算属性
    const  length = computed( () =>list.value.length * 10)
    //准备一个方法
    const pushApi = (str:string) => {
        list.value.push(str)
    }
    
//暴露的内容，别忘了return
return { list ,pushApi,length}

 })
